new Vue({
	el: "body",
	data: {
		city: "天津",
		industrylist: ["软件", "环保", "航空", "政府", "银行", "贸易", "科研", "网游", "工控", "物流", "租赁", "通讯", "电子", "化工", "媒体", "硬件", "机电", "IT服务", "旅游", "建筑"],
		searchtext: "",
		joblist: {},
	},
	methods: {
		searText: function() { //搜索框查询
			var searchtext = this.searchtext;
			location.href = "../joblist/joblist.html?searchtext=" + searchtext;
		}
	},
	created: function() {
		init();
		var _this = this;
		var query = new AV.Query('position');
		var now = new Date();
		query.lessThanOrEqualTo('createdAt', now); //查询今天之前创建的 Todo
		query.ascending('createdAt');
		query.limit(3); // 最多返回 3 条结果
		query.find().then(function(success) {
			console.log(success);
			_this.joblist = success;
		}).catch(function(error) {
			console.log(JSON.stringify(error));
		})
	}
})